<?php

namespace App\Lib\Taobao\request;
use RequestCheckUtil;

/**
 * TOP API: taobao.guangguang.content.topic.search request
 *
 * @author auto create
 * @since 1.0, 2023.11.24
 */
class GuangguangContentTopicSearchRequest
{
    /**
     * 搜索开始位置
     **/
    private $cursor;

    /**
     * 搜索关键词
     **/
    private $keyword;

    /**
     * 机构替用户发布内容时的映射id
     **/
    private $relationId;

    /**
     * 本次搜索数量
     **/
    private $size;

    private $apiParas = array();

    public function setCursor($cursor)
    {
        $this->cursor = $cursor;
        $this->apiParas["cursor"] = $cursor;
    }

    public function getCursor()
    {
        return $this->cursor;
    }

    public function setKeyword($keyword)
    {
        $this->keyword = $keyword;
        $this->apiParas["keyword"] = $keyword;
    }

    public function getKeyword()
    {
        return $this->keyword;
    }

    public function setRelationId($relationId)
    {
        $this->relationId = $relationId;
        $this->apiParas["relation_id"] = $relationId;
    }

    public function getRelationId()
    {
        return $this->relationId;
    }

    public function setSize($size)
    {
        $this->size = $size;
        $this->apiParas["size"] = $size;
    }

    public function getSize()
    {
        return $this->size;
    }

    public function getApiMethodName()
    {
        return "taobao.guangguang.content.topic.search";
    }

    public function getApiParas()
    {
        return $this->apiParas;
    }

    public function check()
    {

        RequestCheckUtil::checkNotNull($this->keyword, "keyword");
        RequestCheckUtil::checkNotNull($this->size, "size");
    }

    public function putOtherTextParam($key, $value)
    {
        $this->apiParas[$key] = $value;
        $this->$key = $value;
    }
}
